import { View } from "@tarojs/components"
import Taro from '@tarojs/taro'

import "./copy-btn.scss"

interface CopyBtnProps {
    className?: string
    value: string
}
const CopyBtn = (props: CopyBtnProps) => {

    let onClick = () => {
        Taro.setClipboardData({
            data: props.value
        })
    }
    return (
        <View className={["copy-btn", props.className].join(" ")} onClick={ onClick }>复制</View>
    )
}

export default CopyBtn